char* replaceSpace(char* s){
    char* head = s;
    int after_length = -1;
    int before_length = -1;
    for (char* node = head; *node != 0; node++, before_length++, after_length++) {
        if (*node == ' ') {
            after_length += 2;
        }
    }
    char* ans = (char*) malloc(after_length + 2);
    *(ans + after_length + 1) = 0;
    for (; before_length >= 0; before_length--) {
        if (*(head + before_length) == ' ') {
            *(ans + after_length) = '0';
            *(ans + after_length - 1) = '2';
            *(ans + after_length - 2) = '%';
            after_length -= 3;
        } else {
            *(ans + after_length) = *(head + before_length);
            after_length--;
        }
    }
    return ans;
}